<?php
/**
 * $Id: new_edit_article.php 192 2010-11-04 07:52:58Z bwanglei@gmail.com $
 */?>
<div id="main"><form method="post" action="<?php echo $blogUrl;?>/admin/new_edit_article.php?action=save-article<?php if ($article) echo '&aid='.$article['id'];?>">
	标题：<br />
	<input id="title_article_form" type="text" name="title_article" value="<?php echo $article['title'];?>" /><br />
	内容：<br />
	<textarea id="content_article_form" name="content_article" id="content_article_form"><?php echo $article['content'];?></textarea><br />
	<div id="tags_article_form">
	<strong><a href="javascript:;" onclick="show_hidde_id('add_tag');">添加标签</a></strong><br />
	<div style="display:none;" id="add_tag">
		<input size="9" type="text" id="add_name_tag" />
		<button type="button" onclick="add_tag('tag_list','add_name_tag');">添加</button>
	</div>
	<strong>选择分类</strong><div id="tag_list"><?php
	foreach ($tag_cache as $tag) {
		?><div><input type="checkbox" id="<?php echo 'id_for_'.$tag['name'];?>" name="tags_article[]" value="<?php echo $tag['name'];?>" <?php if (in_array($tag['name'],$tags)) echo 'checked';?>/><label for="<?php echo 'id_for_'.$tag['name'];?>"><?php echo $tag['name'];?></label></div>
		<?php
	}?></div></div>
	<!-- 上传文件表单-->
	<input type="hidden" id="blogurl_iframe" value="<?php echo $blogUrl;?>" />
	<iframe name="upload_file_iframe" id="upload_file_iframe" frameBorder="0" src="<?php echo $blogUrl;?>/templates/admin/upload_file_iframe.php"></iframe>
	<!-- 设置文章类型-->
	<select id="type_article_form" name="type_article">
		<option value="draft" <?php if ($article['type']=='draft') echo 'selected';?>>草稿</option>
		<option value="article" <?php if ($article['type']=='article') echo 'selected';?>>文章</option>
		<option value="page" <?php if ($article['type']=='page') echo 'selected';?>>页面</option>
	</select>
	<input id="submit_form" type="submit" value="提交" />
</form></div>
